function vailAll(){
    var isSubmit = true;
    if(trim($('input[name="userName"]').val()) == ''){
        $('p.mpt').html('用户名不能为空');
        isSubmit = false;
    }else{
        isSubmit = true;
        if(trim($('input[name="password"]').val()) == ''){
            $('p.mpt').html('密码不能为空');
            isSubmit = false;
        }else if($('input[name="password"]').val().length<6){
            $('p.mpt').html('密码不能少于6位');
            isSubmit = false;
        }else{
            isSubmit = true;
        }
    }
    return  isSubmit;
};
function trim(s){
    return s.replace(/(^\s*)|(\s*$)/g,"");
};
$(document).ready(function(){
//   $('.isRemember').click(function(){
//        $(this).toggleClass('isTrue');
//   });
   $('.input-box').on('focus','input',function(){
       $(this).parent('div').css('border','2px solid #E60012').children('span').addClass('red');
   }).on('blur','input',function(){
       $(this).parent('div').css('border','2px solid #B5B5B5').children('span').removeClass('red');
   });
   $('.userName').on('blur','input',function(){
	   if(trim($('input[name="userName"]').val()) == ''){
            $('p.mpt').html('用户名不能为空');
        }else{
            $('p.mpt').html('');
        }
   });
   $('.passWord').on('blur','input',function(){
	   if(trim($('input[name="password"]').val()) == ''){
            $('p.mpt').html('密码不能为空');
        }else{
            $('p.mpt').html('');
        }
   });
});